<?php


namespace Xiaoguai\DesignPattern\DP017;


abstract class Abstraction
{
    /**
     * @var ImplementorInterface $implementor
     */
    protected $implementor;

    /**
     * @param ImplementorInterface $implementor
     */
    public function __construct(ImplementorInterface $implementor)
    {
        $this->implementor = $implementor;
    }

    /**
     * @param ImplementorInterface $implementor
     */
    public function setImplementor(ImplementorInterface $implementor): void
    {
        $this->implementor = $implementor;
    }

    abstract public function operation();
}